package server;

import java.awt.Color;

import javax.swing.text.Style;
import javax.swing.text.StyleConstants;

public class StyleManager {
    public TestingServer host;
    public Style[] styles;

    public StyleManager(TestingServer host){
        this.host = host;
        this.styles = getStyles();
    }

    public Style[] getStyles(){
        Style[] styles = new Style[5];
        Style y = host.serverGUI.mainOutput.addStyle("Name", null);
        StyleConstants.setFontSize(y, 16);
        StyleConstants.setBold(y, true);

        Style t = host.serverGUI.mainOutput.addStyle("Red", y);
        StyleConstants.setForeground(t, Color.red);
        styles[0] = t;

        t = host.serverGUI.mainOutput.addStyle("Blue", y);
        StyleConstants.setForeground(t, Color.blue);
        styles[1] = t;

        t = host.serverGUI.mainOutput.addStyle("Green", y);
        StyleConstants.setForeground(t, Color.green.darker());
        styles[2] = t;
        
        t = host.serverGUI.mainOutput.addStyle("Orange", y);
        StyleConstants.setForeground(t, Color.orange.darker());
        styles[3] = t;

        t = host.serverGUI.mainOutput.addStyle("Magenta", y);
        StyleConstants.setForeground(t, Color.magenta.darker());
        styles[4] = t;
        return styles;
    }
}
